package com.company.dcm.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * 系统用户
 */
@Data
@TableName("sys_user")
public class User {
    @TableId
    private Long userId;

    /**
     * 登录用户名 10
     */
    private String userName;

    /**
     *md5加密密码 32
     */
    private String password;

    /**
     * 盐 uuid 36
     */
    private String salt;

    /**
     * 状态
     */
    private int status;

    /**
     * 关联角色id，用户权限  0未授权，1boss,2factory manager,3workshop manager
     */
    private Integer roleId;

    @TableField(fill = FieldFill.INSERT)
    private Date createAt;
    @TableField(fill = FieldFill.UPDATE)
    private Date updateAt;

    /**
     * 授权的厂/车间名
     */
    @TableField(exist = false)
    private String perName;
    @TableField(exist = false)
    private Long id;
    @TableField(exist = false)
    private Long factoryId;

}
